package com.asiainfo.kbisheet.services

import com.asiainfo.kbisheet.util.Setting;

String a = "D,I,I2,INTEGER"
a.split(",")

def settingXML = new XmlSlurper().parse(Thread.currentThread().getContextClassLoader().getResource("setting.xml").getFile())
String subsource = settingXML.@subsource
println subsource
println settingXML.@mode
println settingXML.datatype.number.toString().split(",")
println settingXML.datatype.date

def subsettingXML = new XmlSlurper().parse(Thread.currentThread().getContextClassLoader().getResource(subsource).getFile())
println Setting.getSettingVO().getFilesRoot()

println Setting.getSettingVO().getNumbers()
println Setting.getSettingVO().enableAllExport
println Setting.getSettingVO().getKbsbase()
//XmlFileService xmlFileService = new XmlFileService()
//xmlFileService.scanXMlDir()


//println (Thread.currentThread().getContextClassLoader().getResource("setting.properties"))
//println (Setting.class.getClassLoader().getResource(""))
//println (ClassLoader.getSystemResource("."))
//println ((new File((new File(ClassLoader.getSystemResource("").getPath())).getParent())).getParent())
//println (ClassLoader.getSystemResource(""))
//println (Setting.class.getResource(""));
//println (Setting.class.getResource("/"));
// //Class 文件所在路径
//println (new File("/").getAbsolutePath());
//println (System.getProperty("user.dir"));

//String value = "20101234,"
//	println " '" + value.substring(0, 4) + "-"+ value.substring(4, 6) + "-"+ value.substring(6, 8) + "'"
//println value.substring(0, value.length() - 1)